var mongoose = require('mongoose');
require('../model/user.model');
var userModel = mongoose.model('User');

module.exports={
    findByUserId:findByUserId
};

/**
 * find user by ids
 * @param userid
 */
function findByUserId(userid,callBack){
    userModel.findOne({userId:userid}).exec(function(err,doc){
        callBack(err,doc);
    });
}

